from sqlalchemy import Column, ForeignKey, Integer, Table

from ._basic_ import BasicModel

chat_room_user_association = Table(
    'chat_room_user_association', BasicModel.metadata,
    Column('chat_room_id', Integer, ForeignKey('chat_rooms.id'), comment='聊天室 ID'),
    Column('user_id', Integer, ForeignKey('users.id'), comment='用户 ID'),
    comment='聊天室与用户中间表'
)
"""
聊天室与用户中间表
"""

chat_room_conversation_association = Table(
    'chat_room_conversation_association', BasicModel.metadata,
    Column('chat_room_id', Integer, ForeignKey('chat_rooms.id'), comment='聊天室 ID'),
    Column('conversation_id', Integer, ForeignKey('conversations.id'), comment='对话 ID'),
    comment='聊天室与对话中间表'
)
"""
聊天室与对话中间表
"""

conversation_user_association = Table(
    'conversation_user_association', BasicModel.metadata,
    Column('conversation_id', Integer, ForeignKey('conversations.id'), comment='对话 ID'),
    Column('user_id', Integer, ForeignKey('users.id'), comment='用户 ID'),
    comment='用户与对话中间表'
)
"""
用户与对话中间表
"""

conversation_ai_model_association = Table(
    'conversation_ai_model_association', BasicModel.metadata,
    Column('conversation_id', Integer, ForeignKey('conversations.id'), comment='对话 ID'),
    Column('ai_model_id', Integer, ForeignKey('ai_models.id'), comment='AI 模型 ID'),
    comment='AI 模型与对话中间表'
)
"""
AI 模型与对话中间表
"""
